Method for detecting and classifying block edge from DCT-compressed image

ABSTRACT

The present invention provides a method for detecting and classifying block edges from DCT-compressed images, and more particularly, a fast method for classifying the edge direction of each block in the DCT-compressed images. The method includes: extracting DCT coefficients by blocks constituting the compressed image; and applying an arithmetic operation defined for each direction component to the DCT coefficients, and comparing the results of the arithmetic operations to determine the edge direction component. The present invention is directly applied in the DCT domain based on the quantitative analysis on the contribution factor of each DCT coefficient to formation of the directional pattern of the block edge, thereby drastically reducing the computational complexity of arithmetic operations necessary to the detection and classification of block edges.

CROSS REFERENCE TO RELATED APPLICATION

[0001] This application claims priority to and the benefit of Korea Patent Application No. 2002-82866 filed on Dec. 23, 2002 in the Korean Intellectual Property Office, the content of which is incorporated herein by reference.

BACKGROUND OF THE INVENTION

[0002] (a) Field of the Invention

[0003] The present invention relates to a method for detecting block edges from DCT (Discrete Cosine Transform)-compressed images and classifying the edge direction of each block. More specifically, the present invention relates to a method for receiving a DCT-compressed image, recovering DCT coefficients through partial decoding, detecting the edge of each block according to the results of minimal arithmetic operations in the DCT domain without IDCT (Inverse Discrete Cosine Transform), and if any, classifying the edge direction of each block.

[0004] (b) Description of the Related Art

[0005] The conventional technologies for detecting the edge direction of each block from an image have been described in the related documents as follows.

[0006] “Image Vector Quantizer Based on a Classification in the DCT Domain” (IEEE Transactions on Communications, Vol. 39, No. 4, April 1991) by D. S. Kim and S. U. Lee in 1991 discloses a method for detecting and classifying the edge of each block to be quantized so as to improve performance in encoding an image using vector quantization. In this method, a block edge classifier is required to be trained in advance using some image data having an actual block edge component in order to classify the edge of each block. The DCT domain is divided according to the directional component of each edge, and with given DCT coefficients, the directional component of the block edge is determined based on which division the DCT coefficients fall on. This method can be implemented very simply without the IDCT step in classifying the edge component of each block in images, but the performance is greatly dependent upon the training data because it is an inductive method.

[0007] “Efficient Use of MPEG-7 Edge Histogram Descriptor” (ETRI Journal, Vol. 24, No. 1, February 2002) by C. S. Won et al. in 2001 proposed a method of classifying the edge direction of each block as well as a method of applying information about edge direction of each block to the retrieval of images. But, the proposed method, which is performed in the pixel domain, requires IDCT for an input DCT-compressed image, increasing the computational load.

SUMMARY OF THE INVENTION

[0008] It is an advantage of the present invention to provide a method for extracting block edges and classifying the edge direction of each block using relatively simple arithmetic operations for DCT coefficients obtained from DCT-compressed images by partial decoding.

[0009] In one aspect of the present invention, there is provided a method for detecting and classifying block edges from DCT-compressed images, which is directly applied to the DCT coefficients obtained by a partial decoding of the DCT-compressed image by the respective blocks. The method includes: (a) extracting DCT coefficients by blocks constituting the compressed image; and (b) applying an arithmetic operation defined for each direction component to the DCT coefficients obtained in the step (a), and comparing the results of the arithmetic operations to determine the edge direction component.

BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate an embodiment of the invention, and, together with the description, serve to explain the principles of the invention:

[0011]FIG. 1 is an illustration of a pixel domain adapting a block edge detection and classification method according to the present invention; and

[0012]FIG. 2 is a flow chart of the block edge detection and classification method according to the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0013] In the following detailed description, only the preferred embodiment of the invention has been shown and described, simply by way of illustration of the best mode contemplated by the inventor(s) of carrying out the invention. As will be realized, the invention is capable of modification in various obvious respects, all without departing from the invention. Accordingly, the drawings and description are to be regarded as illustrative in nature, and not restrictive.

[0014]FIG. 1 illustrates a pixel domain where the block edge detection and classification method is developed according to the present invention.

[0015] Most DCT-based image compression standards, in which the image is considered as a two-dimensional (2-D) array of pixel blocks, include the steps of applying 2-D DCT to each block, and performing a non-uniform quantization for each DCT coefficient and variable length coding, thereby enhancing compression efficiency. The technical conception of the present invention can be applied irrespective of the block size, but expediently, the description will be given with the block size of 8×8 pixels.

[0016] In the pixel domain, each block is divided into four regions, as shown in FIG. 1, so as to classify the directional component of each block edge. The ordinate (up-to-down) and abscissa (left-to-right) coordinates in one block are denoted by i and j, respectively; and the luminance value of each pixel in the block is given by x(i, j) (where i, j=0, 1, . . . , 7). The averaged luminance value of each area is then expressed by the following equation: $\begin{matrix} {{S_{uv} = {\frac{1}{16}{\sum\limits_{i = 0}^{3}{\sum\limits_{j = 0}^{3}{x\left( {{{4u} + i},{{4v} + j}} \right)}}}}},\quad u,{v = 0},1} & \left\lbrack {{Equation}\quad 1} \right\rbrack \end{matrix}$

[0017] The directional pattern of each edge differentiated by angles in the units of π/4 radian can be estimated according to the distribution of S_(uv) as expressed by the following equation 2. The direction-based arithmetic operations are measured, and the directional component of each block edge is classified as the one whose measure is the greatest among others. $\begin{matrix} \begin{matrix} {{\delta_{NE}\quad \left( {{set}\quad {by}\quad a\quad {user}} \right)}} \\ {{\delta_{0} = {{\frac{S_{00} + S_{01}}{2} - \frac{S_{10} + S_{11}}{2}}}}} \\ {{\delta_{\pi/4} = {\max \left\{ {{{S_{00} - \frac{S_{01} + S_{10} + S_{11}}{3}}},{{S_{11} - \frac{S_{00} + S_{01} + S_{10}}{3}}}} \right\}}}} \\ {\delta_{\pi/2} = {{\frac{S_{00} + S_{10}}{2} - \frac{S_{01} + S_{11}}{2}}}} \\ {\delta_{3{\pi/4}} = {\max \left\{ {{{S_{01} - \frac{S_{00} + S_{10} + S_{11}}{3}}},{{S_{10} - \frac{S_{00} + S_{01} + S_{11}}{3}}}} \right\}}} \end{matrix} & \left\lbrack {{Equation}\quad 2} \right\rbrack \end{matrix}$

[0018] where δ_(θ) represents the arithmetic operation for the θ radian directional component; and δ_(NE) represents the measure in the case where there is no edge component. δ_(NE) is not separately calculated, and can be predetermined by the user.

[0019] To define 2-D DCT with 8×8 samples, C_(2N) ^(f) and e(τ) are expressed by the following equations 3 and 4, respectively, and the luminance value x(k,l) of the pixels by blocks is converted to the DCT coefficient X(m,n) according to the equation 5. $\begin{matrix} {C_{2N}^{\tau} = {\cos \quad \frac{\pi\tau}{2N}}} & \left\lbrack {{Equation}\quad 3} \right\rbrack \end{matrix}$

$\begin{matrix} {{e(\tau)} = {\langle\begin{matrix} {{1/\sqrt{2}},} & {if} & {\tau = 0} \\ {1,} & {elsewhere} & \quad \end{matrix}}} & \left\lbrack {{Equation}\quad 4} \right\rbrack \end{matrix}$

$\begin{matrix} {{{X\left( {m,n} \right)} = {\frac{{e(m)}{e(n)}}{16\alpha}{\sum\limits_{k = 0}^{7}{\sum\limits_{l = 0}^{7}{{x\left( {k,l} \right)}C_{16}^{{({{2k} + 1})}m}C_{16}^{{({{2l} + 1})}n}}}}}},m,{n = 0},1,\ldots \quad,7} & \left\lbrack {{Equation}\quad 5} \right\rbrack \end{matrix}$

[0020] The inverse transform, i.e., IDCT for the equation 5 is expressed by the equation 6. $\begin{matrix} {{{X\left( {k,l} \right)} = {\alpha {\sum\limits_{m = 0}^{7}{\sum\limits_{n = 0}^{7}{{e(m)}{e(n)}{X\left( {m,n} \right)}C_{16}^{{({{2k} + 1})}m}C_{16}^{{({{2l} + 1})}n}}}}}},k,{l = 0},1,\ldots \quad,7} & \left\lbrack {{Equation}\quad 6} \right\rbrack \end{matrix}$

[0021] In the equations 5 and 6, α is a multiplicative constant determined in consideration of the different variants of the DCT equation.

[0022] When substituting the equation 6 into the equation 1, each arithmetic operation of the edge direction component as expressed by the equation 2 is rewritten as the following equation 7 in terms of the DCT coefficients.

δ₀=2|V|

δ_(π/2)=4max{|H+V+D|,|H+V−D|}/3

δ_(π/2)=2|H|

δ_(3π/4)=4max{|H−V+D|,|H−V−D|}/3  [Equation 7]

[0023] In the equation 7, H, V, and D are given by the equation 8. $\begin{matrix} {{H = {\underset{({odd})}{\sum\limits_{n = 1}^{7}}{{w\left( {0,n} \right)}{X\left( {0,n} \right)}}}}{V = {\underset{({odd})}{\sum\limits_{n = 1}^{7}}{{w\left( {m,0} \right)}{X\left( {m,0} \right)}}}}{D = {{\underset{({odd})}{\sum\limits_{n = 1}^{7}}{{w\left( {n,n} \right)}{X\left( {n,n} \right)}}} + {\underset{({odd})}{\sum\limits_{m = 1}^{7}}{\underset{({odd})}{\sum\limits_{n = 1}^{m - 1}}{{w\left( {m,n} \right)}\left( {{X\left( {m,n} \right)} + {X\left( {n,m} \right)}} \right)}}}}}} & \left\lbrack {{Equation}\quad 8} \right\rbrack \end{matrix}$

[0024] In the equation 8, w(m, n) is given by the equation 9.

w(m,n)=αe(m)e(n)C ₁₆ ^(4m) C ₁₆ ^(2m) C ₁₆ ^(m) C ₁₆ ^(4n) C ₁₆ ^(2n) C ₁₆ ^(n)  [Equation 9]

[0025] All of the absolute values of the equation 7 are calculated with a computational load of 18 multiplications and 27 additions, which corresponds to around one-fifth of the computational load of 94 multiplications and 454 additions in the 2-D fast IDCT process. This means that the method for detecting block edges and classifying the edge direction of each block in the DCT domain assures the same performance with a drastic cut of the computational load relative to the method in the pixel domain.

[0026] Most the DCT-based image compression standards include the step of quantizing DCT coefficients. Thus, the DCT coefficients undergo being multiplied by dequantizing multiplicative constants to be recovered the DCT coefficients in decoding the compressed images. Instead of the ordinary dequantizing multiplicative constant, the dequantizing multiplicative constant scaled by w(m, n) can be used for dequantization in order to directly calculate “Y(m, n)=w(m, n)X(m, n)”. In this case, the equation 8 is rewritten as the following equation 10, avoiding the computational load of multiplications. $\begin{matrix} {{H = {\underset{({odd})}{\sum\limits_{n = 1}^{N - 1}}{Y\left( {0,n} \right)}}},{V = {\underset{({odd})}{\sum\limits_{n = 1}^{N - 1}}{Y\left( {m,0} \right)}}},{D = {\underset{({odd})}{\sum\limits_{m = 1}^{N - 1}}{\underset{({odd})}{\sum\limits_{n = 1}^{N - 1}}{Y\left( {m,n} \right)}}}}} & \left\lbrack {{Equation}\quad 10} \right\rbrack \end{matrix}$

[0027] w(m, n) is rapidly decreased with an increase in “m” and “n”. This means that the detection and classification results are not seriously affected by truncating the high frequency components of the DCT coefficients above the upper limits of the “m” and “n” set to L (1≦L≦N−1) rather than (N−1) in summations of the equation 8 or 10. For L=1, the calculation results of the equation 9 are w(0,1)=w(1,0)≈0.4531α and w(1,1)≈0.4105α, both of which can be approximated to 0.5 α, expediently.

[0028] Hereinafter, reference will be made to FIG. 2 in order to describe the implementation method of this technical conception.

[0029] Referring to FIG. 2, the method includes a block-based variable length code decoding step 210 using DCT-compressed images as an input, a dequantizing step 220 to obtain DCT coefficients, and a block edge detecting step 230 using arithmetic operation and comparison of the DCT coefficients, to construct a block edge map.

[0030] As described above, most of the DCT-based image compression standards use a method of DCT, non-uniform quantization of DCT coefficients, and compression by a variable-length coding technique, such as run-length coding or Huffman coding. In this specification of the present invention, the process for run-length coding and Huffman code decoding will not be described in detail.

[0031] The variable-length code decoding step 210 includes decoding the run-length code and the Huffman code of each block in the DCT-compressed image.

[0032] The dequantizing step 220 includes multiplying each of the non-uniformly quantized DCT coefficients obtained through the variable length code decoding step by a multiplicative constant to recover the DCT coefficients. For enhancing the efficiency of computation, as described above, a new multiplicative constant obtained by multiplying the ordinary dequantizing multiplicative constant by w(m, n) can be used to perform dequantization and directly calculate Y(m, n)=w(m, n)X(m, n).

[0033] The block edge detecting step 230 using arithmetic operation and comparison includes calculating δ₀, δ_(π/4), δ_(π/2) and δ_(3π/4) according to the equation 7˜9, comparing these four values with δ_(NE) predefined by the user, and selecting the component whose measure is the largest value as the edge direction of the corresponding block. The equation 8 is substituted with the equation 10 in the case of directly recovering Y(m, n)=w(m, n)X(m, n) instead of X(m, n) in the dequantizing step 220.

[0034] While this invention has been described in connection with what is presently considered to be the most practical and preferred embodiment, it is to be understood that the invention is not limited to the disclosed embodiments, but, on the contrary, is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

[0035] As described above, the present invention provides a method for classifying the edge direction of each block in the DCT-compressed image that is directly applied in the DCT domain based on the quantitative analysis on the contribution factor of each DCT coefficient to formation of the directional pattern of the block edge, thereby drastically reducing the computational complexity of arithmetic operations necessary to the detection and classification of block edges. 

What is claimed is:
 1. A method for detecting and classifying block edges from DCT (Discrete Cosine Transform)-compressed images, which is for detecting the edge of each block from DCT-compressed images and classifying an edge direction component of each block, the method comprising: (a) extracting DCT coefficients by N×N blocks constituting the compressed image; and (b) applying an arithmetic operation defined for each direction component to the DCT coefficients obtained in (a), and comparing the results of the arithmetic operations to determine the edge direction component.
 2. The method as claimed in claim 1, wherein the arithmetic operation of (b) comprises a combination of H, V, and D that are the weighted sums of the extracted DCT coefficients as given by the following equations: $H = {\underset{({odd})}{\sum\limits_{n = 1}^{N - 1}}{{w\left( {0,n} \right)}{X\left( {0,n} \right)}}}$ $V = {\underset{({odd})}{\sum\limits_{n = 1}^{N - 1}}{{w\left( {m,0} \right)}{X\left( {m,0} \right)}}}$ $D = {{\underset{({odd})}{\sum\limits_{n = 1}^{N - 1}}{{w\left( {n,n} \right)}{X\left( {n,n} \right)}}} + {\underset{({odd})}{\sum\limits_{m = 1}^{N - 1}}{\underset{({odd})}{\sum\limits_{n = 1}^{m - 1}}{{w\left( {m,n} \right)}\left( {{X\left( {m,n} \right)} + {X\left( {n,m} \right)}} \right)}}}}$

where m and n represent spatial frequency components in vertical and horizontal directions, respectively, and satisfy 0≦m, n≦N.
 3. The method as claimed in claim 1, wherein (a) comprises extracting Y(m, n)=w(m, n)X(m, n) that is a multiplication of the DCT coefficient X(m, n) by a quantitative numeric, rather than simply extracting the DCT coefficient, wherein (b) of performing each arithmetic operation comprises determining H, V, and D according to the following equations to construct an arithmetic operation for each edge direction using a combination of H, V, and D: ${H = {\underset{({odd})}{\sum\limits_{n = 1}^{N - 1}}{Y\left( {0,n} \right)}}},{V = {\underset{({odd})}{\sum\limits_{n = 1}^{N - 1}}{Y\left( {m,0} \right)}}},{D = {\underset{({odd})}{\sum\limits_{m = 1}^{N - 1}}{\underset{({odd})}{\sum\limits_{n = 1}^{N - 1}}{Y\left( {m,n} \right)}}}}$


4. The method as claimed in claim 2, wherein (b) of calculating H, V, and D comprises performing summations up to upper limits of the “m” and “n” set to L (1≦L≦N−1) rather than N−1 to construct the arithmetic operation for each edge direction component.
 5. The method as claimed in claim 3, wherein (b) of calculating H, V, and D comprises performing summations up to upper limits of the “m” and “n” set to L (1≦L≦N−1) rather than N−1 to construct the arithmetic operation for each edge direction component.
 6. The method as claimed in claim 4, wherein (b) comprises setting L=1, and computing H, V, and D with w(0,1)=w(1,0)=w(1,1)≈0.5α.
 7. The method as claimed in claim 2, wherein w(m, n) of (b) is calculated according to the following equation: w(m,n)=αe(m)e(n)C ₁₆ ^(4m) C ₁₆ ^(2m) C ₁₆ ^(m) C ₁₆ ^(4n) C ₁₆ ^(2n) C ₁₆ ^(n) wherein ${C_{2N}^{\tau} = {\cos \frac{\tau}{2N}}};{{(\tau)} = {\langle\begin{matrix} \begin{matrix} \begin{matrix} {{1\text{/}\sqrt{2}},} \\ {1,} \end{matrix} & \begin{matrix} {if} \\ {elsewhere} \end{matrix} \end{matrix} & \begin{matrix} {{\tau = 0};} \\ \quad \end{matrix} \end{matrix}}}$

and α is a multiplicative constant determined in consideration of different variants of the DCT equation.
 8. The method as claimed in claim 3, wherein w(m, n) of (b) is calculated according to the following equation: w(m,n)=αe(m)e(n)C ₁₆ ^(4m) C ₁₆ ^(2m) C ₁₆ ^(m) C ₁₆ ^(4n) C ₁₆ ^(2n) C ₁₆ ^(n) wherein ${C_{2N}^{\tau} = {\cos \frac{\tau}{2N}}};{{(\tau)} = {\langle\begin{matrix} \begin{matrix} \begin{matrix} {{1\text{/}\sqrt{2}},} \\ {1,} \end{matrix} & \begin{matrix} {if} \\ {elsewhere} \end{matrix} \end{matrix} & \begin{matrix} {{\tau = 0};} \\ \quad \end{matrix} \end{matrix}}}$

and α is a multiplicative constant determined in consideration of different variants of the DCT equation.
 9. The method as claimed in claim 2, wherein (b) comprises classifying each edge direction component into NE (No Edge), 0 radian, π/4 radian, π/2 radian, and 3π/4 radian, computing measuring the arithmetic operation of each directional component using the H, V, and D determined in claim 2 or 3 according to the following equations, and classifying the direction component of each block edge as the the one whose measure is the greatest among others: δ_(NE) (set by a user) δ₀=2|V| $\begin{matrix} {\delta_{/4} = {\frac{4}{3}\max \left\{ {{{H + V + D}},{{H + V - D}}} \right\}}} \\ {\delta_{/2} = {2{H}}} \\ {\delta_{3{/4}} = {\frac{4}{3}\max \left\{ {{{H - V + D}},{{H - V - D}}} \right\}}} \end{matrix}$


10. The method as claimed in claim 3, wherein (b) comprises classifying each edge direction component into NE (No Edge), 0 radian, π/4 radian, π/2 radian, and 3π/4 radian, computing measuring the arithmetic operation of each directional component using the H, V, and D determined in claim 2 or 3 according to the following equations, and classifying the direction component of each block edge as the the one whose measure is the greatest among others: δ_(NE) (set by a user) δ₀=2|V| $\delta_{\pi/4} = {\frac{4}{3}\max \left\{ {{{H + V + D}},{{H + V - D}}} \right\}}$

δ_(π/2)=2|H| $\delta_{3{\pi/4}} = {\frac{4}{3}\max \left\{ {{{H - V + D}},{{H - V - D}}} \right\}}$ 